@extends('admin.base')
@section('title', '客服中心')
@section('content')
    <div id="main">
        <div class="layui-card">
            <fieldset class="layui-elem-field">
                <div class="layui-field-box">
                    <span class="layui-breadcrumb">
                      <a href="/admin/home">首页</a>
                      <a><cite>导航元素</cite></a>
                    </span>
                    <span class="pull-right">
                        <button class="layui-btn layui-btn-sm"
                                onclick="active('{{url('admin/asd/add')}}','','添加','800px','300px');">
                            <i class="layui-icon">&#xe608;</i> 添加
                        </button>
                    </span>
                </div>
            </fieldset>
            <div class="layui-tab layui-tab-card">
                <ul class="layui-tab-title">
                    <li class="layui-this">手机号</li>
                    <li>微信</li>
                </ul>
                <div class="layui-tab-content" style="height: 680px;">
                    <div class="layui-tab-item layui-show">
                        @foreach($asd_tel as $v)
                            <div class="layui-form-item">

                                <div class="layui-inline">
                                    <label class="layui-form-label">手机号</label>
                                    <div class="layui-input-inline">
                                        <input type="tel" name="phone" value="{{$v->phone}}" lay-verify="required|phone"
                                               autocomplete="off" class="layui-input" disabled>
                                    </div>
                                    <button class="layui-btn layui-btn-danger" onclick="del('{{url('admin/asd/del')}}','{{$v['id']}}');">
                                        删除
                                    </button>
                                </div>
                            </div>
                        @endforeach
                    </div>
                    <div class="layui-tab-item">
                        <table class="layui-table" lay-even lay-size="">
                            <colgroup>
                                <col width="">
                                <col width="">
                                <col width="">
                                <col width="">
                                <col width="">
                                <col width="">
                            </colgroup>

                            <thead>
                            <tr>
                                <th class="tc">ID</th>
                                <th class="tc">账号</th>
                                <th class="tc">二维码</th>
                                <th class="tc">操作</th>
                            </tr>
                            <tbody>
                            @if($asd_wec->isEmpty())
                                <tr>
                                    <td colspan="4" style="text-align: center;">暂无数据</td>
                                </tr>
                            @else
                                @foreach ($asd_wec as $v)
                                    <tr>
                                        <td class="tc">{{ $v['id'] }}</td>
                                        <td class="tc">{{ $v['phone'] }}</td>
                                        <td class="tc"><img src="{{$v['qrcode']}}"></td>
                                        <td class="tc">
                                            <div class="layui-btn-group" >
                                                <button class="layui-btn layui-btn-sm layui-btn-danger" onclick="del('{{url('admin/asd/del')}}','{{$v['id']}}');" >删除</button>
                                            </div>
                                        </td>
                                    </tr>
                                @endforeach
                            @endif
                            </tbody>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection
@section('js')